<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "area".
 *
 * @property int $_id
 * @property string $name
 * @property string $area_id
 * @property string $city_id
 */
class Area extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'area';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['_id'], 'required'],
            [['_id'], 'integer'],
            [['name'], 'string', 'max' => 32],
            [['area_id', 'city_id'], 'string', 'max' => 8],
            [['_id'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            '_id'     => 'Id',
            'name'    => 'Name',
            'area_id' => 'Area ID',
            'city_id' => 'City ID',
        ];
    }
}
